package cn.edu.jiangnan.cashmanagement.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
 * 用户表
 * */
@Entity
@Table(name="user_tbl")
public class UserEntity implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id")
	private Long				userId;
	
	@Column(name="usernumber",length=10,nullable=false)
	private String				userNumber;//员工编号
	
	@Column(name = "username", length = 50,	nullable = false)
	private String				userName;
	
	@Column(name = "password", length = 50,nullable=false)
	private String				password;
	
	@Column(name = "truename", length = 100, nullable = false)
	private String				trueName;			// 真实姓名
	
	@Column(name = "sex", length = 1)
	private String				sex;				// 性别
	
	@Column(name = "headship", length = 50)
	private String				headship;			// 职务
	
	@Column(name = "director", length = 100)
	private String				director;			// 直接上级
	
	@Column(name = "officeTel", length = 20)
	private String				officeTel;			// 办公电话
	
	@Column(name = "homeTel", length = 20)
	private String				homeTel;			// 家庭电话
	
	@Column(name = "mobile", length = 20)
	private String				mobile;			// 移动电话
	
	@Column(name = "officemail", length = 255)
	private String				officeMail;		// 公务邮件
	
	//删除标记：删除时不正真删除，0:不删除 1：删除
	@Column(name = "deltag", length = 1)
	private String				delTag;				// 删除标记
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "birthday")
	private Date				birthday;			// 用户生日
	
	@Column(name="national",length=20)
	private String				national;			//籍贯 (填)
	
	@Column(name="politics",length=10)
	private String				politics;			//政治面貌(填)
	
	@Column(name = "identityCard", length = 18)
	private String				identityCard;		// 身份证号
	
	@Column(name = "identityAddress", length =50)
	private String				identityAddress;	//身份证地址
	
	@Column(name = "education", length =10)
	private String				education;			//学历
	
	@Column(name = "school", length =10)
	private String				school;				//学校(最高学历)
	
	@Column(name = "specialty", length =20)
	private String				specialty;			//专业
	
	@Column(name = "trainMethod", length =10)
	private String				trainMethod;		//培养方式
	
	@Column(name = "graduationDate")
	private Date				graduationDate;		//毕业时间
	
	@Column(name = "jobDate")
	private Date				jobDate;			//参加工作时间
	
	@Column(name = "experience",length=500)
	private String				experience;			//入职前的工作经历

	@Column(name = "qq", length = 20)
	private String				qq;					// QQ号码
	
	@Column(name = "msn", length = 50)
	private String				msn;				// MSN
	
	@Column(name = "holdAddress",length=100)
	private String				holdAddress;		//户籍地址
	
	@Column(name = "address", length = 100)
	private String				address;			// 家庭地址
	
	@Column(name = "zipcode", length = 10)
	private String				zipcode;			// 邮编
	
	@Column(name = "email", length = 50)
	private String				email;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "department_id")
	@org.hibernate.annotations.ForeignKey(name = "user_tbl_fk_department")
	private DepartmentEntity	department;
	
	@Column(name = "post", length = 50)
	private String				post;			//岗位
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name="role_id")
	private RoleEntity			role;
	
	@Column(name = "entryDate")
	private Date		entryDate;//入职时间
	
	@Column(name = "staffStatus",length=5)
	private String		staffStatus;//离职、在职、试用
	
	@Column(name = "contractStart")
	private Date		contractStart;
	
	@Column(name = "contractEnd")
	private Date		contractEnd;
	
	@Column(name = "probation",length=2)
	private String		probation;//试用期(月)
	
	@Column(name = "departureDate")
	private Date		departureDate;//离职日期
	
	@Column(name = "staffType",length=10)
	private String		staffType;//员工类别
	
	@Column(name = "bank",length=10)
	private String		bank;//银行
	
	@Column(name = "bankNo",length=20)
	private String		bankNo;//银行帐号
	
	@Column(name = "notes",length=500)
	private String		notes;//备注
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastLoginTime")
	private Date lastLoginTime;	//最后登录时间
	
	/**
	 * 该用户是否可以重复登录，0：不可重复登录，提示已登录提示（默认），1：可重复登录
	 */
	@Column(name = "loginType", length = 1)
	private String loginType;
	
	/**
	 * 登录统计
	 */
	@Column(name = "loginCount")
	private Integer	loginCount;

	public Long getUserId()
	{
		return userId;
	}

	public void setUserId(Long userId)
	{
		this.userId = userId;
	}

	public String getUserNumber()
	{
		return userNumber;
	}

	public void setUserNumber(String userNumber)
	{
		this.userNumber = userNumber;
	}

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

	public String getTrueName()
	{
		return trueName;
	}

	public void setTrueName(String trueName)
	{
		this.trueName = trueName;
	}

	public String getSex()
	{
		return sex;
	}

	public void setSex(String sex)
	{
		this.sex = sex;
	}

	public String getHeadship()
	{
		return headship;
	}

	public void setHeadship(String headship)
	{
		this.headship = headship;
	}

	public String getDirector()
	{
		return director;
	}

	public void setDirector(String director)
	{
		this.director = director;
	}

	public String getOfficeTel()
	{
		return officeTel;
	}

	public void setOfficeTel(String officeTel)
	{
		this.officeTel = officeTel;
	}

	public String getHomeTel()
	{
		return homeTel;
	}

	public void setHomeTel(String homeTel)
	{
		this.homeTel = homeTel;
	}

	public String getMobile()
	{
		return mobile;
	}

	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}

	public String getOfficeMail()
	{
		return officeMail;
	}

	public void setOfficeMail(String officeMail)
	{
		this.officeMail = officeMail;
	}

	public String getDelTag()
	{
		return delTag;
	}

	public void setDelTag(String delTag)
	{
		this.delTag = delTag;
	}

	public Date getBirthday()
	{
		return birthday;
	}

	public void setBirthday(Date birthday)
	{
		this.birthday = birthday;
	}

	public String getNational()
	{
		return national;
	}

	public void setNational(String national)
	{
		this.national = national;
	}

	public String getPolitics()
	{
		return politics;
	}

	public void setPolitics(String politics)
	{
		this.politics = politics;
	}

	public String getIdentityCard()
	{
		return identityCard;
	}

	public void setIdentityCard(String identityCard)
	{
		this.identityCard = identityCard;
	}

	public String getIdentityAddress()
	{
		return identityAddress;
	}

	public void setIdentityAddress(String identityAddress)
	{
		this.identityAddress = identityAddress;
	}

	public String getEducation()
	{
		return education;
	}

	public void setEducation(String education)
	{
		this.education = education;
	}

	public String getSchool()
	{
		return school;
	}

	public void setSchool(String school)
	{
		this.school = school;
	}

	public String getSpecialty()
	{
		return specialty;
	}

	public void setSpecialty(String specialty)
	{
		this.specialty = specialty;
	}

	public String getTrainMethod()
	{
		return trainMethod;
	}

	public void setTrainMethod(String trainMethod)
	{
		this.trainMethod = trainMethod;
	}

	public Date getGraduationDate()
	{
		return graduationDate;
	}

	public void setGraduationDate(Date graduationDate)
	{
		this.graduationDate = graduationDate;
	}

	public Date getJobDate()
	{
		return jobDate;
	}

	public void setJobDate(Date jobDate)
	{
		this.jobDate = jobDate;
	}

	public String getExperience()
	{
		return experience;
	}

	public void setExperience(String experience)
	{
		this.experience = experience;
	}

	public String getQq()
	{
		return qq;
	}

	public void setQq(String qq)
	{
		this.qq = qq;
	}

	public String getMsn()
	{
		return msn;
	}

	public void setMsn(String msn)
	{
		this.msn = msn;
	}

	public String getHoldAddress()
	{
		return holdAddress;
	}

	public void setHoldAddress(String holdAddress)
	{
		this.holdAddress = holdAddress;
	}

	public String getAddress()
	{
		return address;
	}

	public void setAddress(String address)
	{
		this.address = address;
	}

	public String getZipcode()
	{
		return zipcode;
	}

	public void setZipcode(String zipcode)
	{
		this.zipcode = zipcode;
	}

	public String getEmail()
	{
		return email;
	}

	public void setEmail(String email)
	{
		this.email = email;
	}

	public DepartmentEntity getDepartment()
	{
		return department;
	}

	public void setDepartment(DepartmentEntity department)
	{
		this.department = department;
	}

	public String getPost()
	{
		return post;
	}

	public void setPost(String post)
	{
		this.post = post;
	}

	public RoleEntity getRole()
	{
		return role;
	}

	public void setRole(RoleEntity role)
	{
		this.role = role;
	}

	public Date getEntryDate()
	{
		return entryDate;
	}

	public void setEntryDate(Date entryDate)
	{
		this.entryDate = entryDate;
	}

	public String getStaffStatus()
	{
		return staffStatus;
	}

	public void setStaffStatus(String staffStatus)
	{
		this.staffStatus = staffStatus;
	}

	public Date getContractStart()
	{
		return contractStart;
	}

	public void setContractStart(Date contractStart)
	{
		this.contractStart = contractStart;
	}

	public Date getContractEnd()
	{
		return contractEnd;
	}

	public void setContractEnd(Date contractEnd)
	{
		this.contractEnd = contractEnd;
	}

	public String getProbation()
	{
		return probation;
	}

	public void setProbation(String probation)
	{
		this.probation = probation;
	}

	public Date getDepartureDate()
	{
		return departureDate;
	}

	public void setDepartureDate(Date departureDate)
	{
		this.departureDate = departureDate;
	}

	public String getStaffType()
	{
		return staffType;
	}

	public void setStaffType(String staffType)
	{
		this.staffType = staffType;
	}

	public String getBank()
	{
		return bank;
	}

	public void setBank(String bank)
	{
		this.bank = bank;
	}

	public String getBankNo()
	{
		return bankNo;
	}

	public void setBankNo(String bankNo)
	{
		this.bankNo = bankNo;
	}

	public String getNotes()
	{
		return notes;
	}

	public void setNotes(String notes)
	{
		this.notes = notes;
	}

	public Date getLastLoginTime()
	{
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime)
	{
		this.lastLoginTime = lastLoginTime;
	}

	public String getLoginType()
	{
		return loginType;
	}

	public void setLoginType(String loginType)
	{
		this.loginType = loginType;
	}

	public Integer getLoginCount()
	{
		return loginCount;
	}

	public void setLoginCount(Integer loginCount)
	{
		this.loginCount = loginCount;
	}
}
